<template>
    <ul>
        <template v-for="(m,index) in item">
            <el-submenu :index="index.toString()" v-if="m.type == 1"  :key="index">
                <template slot="title">
                    <i class="el-icon-location"></i>
                    <span>{{m.name}}</span>
                </template>
                <Item :item="m.children" />
            </el-submenu>
             <el-menu-item v-else-if="m.type == 2" index="1-4-1" :key="index">{{m.name}}</el-menu-item>
        </template>


    </ul>
</template>

<script>
export default {
    name:"Item",
    props:["item"],
    data() {
        return {};
    },
    mounted() {},
    methods: {},
    components:{}
};
</script>

<style lang='scss'>

</style>
